package asava.trees;

/**
 * @author Tim Richter
 */
public final class Conditional extends Tree {
    public Tree condition;
    public Tree thenPart;
    public Tree elsePart;

    public Conditional(final Tree condition,
                       final Tree thenPart,
                       final Tree elsePart) {
        this.condition = condition;
        this.thenPart = thenPart;
        this.elsePart = elsePart;
    }

    @Override
    public int kind() {
        return TreeKind.COND;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
